//
//  NSArray+Tool.m
//  SLDemo
//
//  Created by bocai on 2016/12/2.
//  Copyright © 2016年 Heracles. All rights reserved.
//

#import "NSArray+Tool.h"

@implementation NSArray (Tool)

- (NSArray *)t_reverseArray
{
    return [self reverseObjectEnumerator].allObjects;
}

+ (NSArray *)t_arrayWithPlistName:(NSString *)name
{
    NSString *plistPath = [[NSBundle mainBundle] pathForResource:name ofType:@"plist"];
    return [NSArray arrayWithContentsOfFile:plistPath];
}

- (id)t_objectAtReverseIndex:(NSInteger)index
{
    return self[self.count - 1 - index];
}

@end
